-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
build, doc: use new api doc tooling #57343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Review requested:
|
77ede22 to
3423c21
Compare
3423c21 to
451f8a7
Compare
cf2609b to
a3ce99d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #57343 +/- ##
==========================================
- Coverage 89.74% 89.73% -0.01%
==========================================
Files 675 675
Lines 204642 204642
Branches 39322 39327 +5
==========================================
- Hits 183657 183642 -15
- Misses 13257 13287 +30
+ Partials 7728 7713 -15 🚀 New features to boost your workflow:
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
ovflowd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the result of many months of arduous work between many awesome folks, including @flakey5 @AugustinMauroy @araujogui @ovflowd @avivkeller and others.
I'm so proud of what we are achieving here and this is a huge step towards a modern tooling and a revamped API docs within Node.js
Approving, as I believe this is ready!
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSLGTM because it is hard to review and outside of my comfort zone.
|
No it does apply, in the test file we have And FWIW I definitely agree that the current JSON output is in a less than ideal, and a reform would be welcome – but in a follow up semver-major PR. |
|
I wanted to clarify a few points regarding the JSON structure and why the ordering has changed. First, it's important to note that the top-level keys (which dictate the content order from the source Markdown) remain intact. We aren't introducing any breaking changes to the overall sequence of the document content. Regarding the inner keys of each entry:
Since JSON objects are inherently unordered, this change shouldn't break any standard parsing. Unless a downstream consumer is accessing keys by index (e.g., While we can refactor the new tooling to mirror the legacy order if it’s considered a blocker, it feels like an unnecessary use of resources for a change that doesn't provide functional value. The current test failures seem to be a result of the tests expecting a specific string-matching order rather than validating the schema itself. @aduh95, could you provide a real-world example of where this specific internal key order would break downstream usage? It would help to understand if there's a dependency I'm overlooking. To clarify for everyone else, the concern is that keys like
Note: The highlighted keys are just examples of the shift in placement. Even in the legacy tooling, this order wasn't always 100% consistent across different files. |
Me trying to review this PR. With keys in a different order, it's very hard to review. With nodejs/doc-kit#595, at least I'm able to diff which allows me to see that e.g.
The HTML version is also suffering from the lack of parsing:
I haven't investigated, that's likely due to the conflict on The sub-keys being in a different order does produce a lot of diff in the output, it's annoying but I guess it's workable. BTW there are indeed lots of bug fixes, so good work! |
That's an issue with the markdown. See #61756 |
Gotcha, for manual comparison of the JSON this makes sense. I guess we can land nodejs/doc-kit#595
Do you mean to say the "node:process's 'message' event params are no longer parsed correctly:" is an issue on the markdown or? |
3b3a9e2 to
5f45cfa
Compare
Yes. The new tooling is much stricter on what it considers valid vs invalid. The markdown for that particular event would be considered invalid by the new tooling. Once this PR lands, we can land the new linter, which will identify invalid markdown before they land. |
|
@aduh95 hopefully all your concerns are resolved? |
I'd argue we should fix that specific Markdown file before we land this PR, otherwise that section is broken. |
|
See #61756 |
Switches over to using the new doc generation tooling. For more background on this, please see nodejs#52343 Signed-off-by: flakey5 <[email protected]> Co-authored-by: Claudio W <[email protected]> Co-authored-by: avivkeller <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]> Co-authored-by: Joyee Cheung <[email protected]>
b21ec68 to
0791d1e
Compare
|
A few bugs I've found while browsing the JSON diff: When a function has multiple signatures, on this PR it's no longer taken into account, the JSON no longer contains info about e.g. return type or history
|
It still does, however, it correctly places the return type, history, etc with the signature it is associated with. (i.e. you'll find all the
Noted. We can just remove the
There's a give/take here. The more exclusive the parsing is, the higher the chance of a false-negative. The less exclusive, the higher the chance of a false positive. That being said, I don't think it'll break anything if we exclude |
There are two cases:
That's a regression, not a major one, but still one worth fixing before we can safely backport.
It definitely matters for the DX though |
It is called time travel, Antoine, never heard of? Future versions actually came before! 😛 |










Switches over to using the new doc generation tooling. For more background on this, please see #52343
Currently a draft just to get feedback on the approach to this integration.cc @nodejs/web-infra
Notable Change info (by @avivkeller):
The Node.js Website and Website Infrastructure teams have introduced a brand-new documentation pipeline, modernizing how our API docs are generated. While the documentation site may look familiar today, this infrastructure we are hard at work making a completely refreshed user interface in the very near future!